package com.user.service.send.service.config;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(value = "spring.profiles.active",havingValue = "dev")
public class DevProcessor implements BeanPostProcessor {



    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        // 设置微服务调试模式下的的ip端口信息
        // 不注册到nacos上,@FeignClient调用指定了url就不会再从nacos上拉取服务信息走负载均衡了
//        System.setProperty("spring.cloud.nacos.discovery.register-enabled", "false");

        return bean;
    }


}
